\(\int \frac {1}{5+3 \tan (c+d x)} \, dx\) [499]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 31 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {5 x}{34}+\frac {3 \log (5 \cos (c+d x)+3 \sin (c+d x))}{34 d} \]

[Out]

5/34*x+3/34*ln(5*cos(d*x+c)+3*sin(d*x+c))/d

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3565, 3611} \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {3 \log (3 \sin (c+d x)+5 \cos (c+d x))}{34 d}+\frac {5 x}{34} \]

[In]

Int[(5 + 3*Tan[c + d*x])^(-1),x]

[Out]

(5*x)/34 + (3*Log[5*Cos[c + d*x] + 3*Sin[c + d*x]])/(34*d)

Rule 3565

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[a*(x/(a^2 + b^2)), x] + Dist[b/(a^2 + b^2),
 Int[(b - a*Tan[c + d*x])/(a + b*Tan[c + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3611

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c/(b*f))
*Log[RemoveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {5 x}{34}+\frac {3}{34} \int \frac {3-5 \tan (c+d x)}{5+3 \tan (c+d x)} \, dx \\ & = \frac {5 x}{34}+\frac {3 \log (5 \cos (c+d x)+3 \sin (c+d x))}{34 d} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.05 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.10 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=-\frac {\left (\frac {3}{68}+\frac {5 i}{68}\right ) \log (i-\tan (c+d x))}{d}-\frac {\left (\frac {3}{68}-\frac {5 i}{68}\right ) \log (i+\tan (c+d x))}{d}+\frac {3 \log (5+3 \tan (c+d x))}{34 d} \]

[In]

Integrate[(5 + 3*Tan[c + d*x])^(-1),x]

[Out]

((-3/68 - (5*I)/68)*Log[I - Tan[c + d*x]])/d - ((3/68 - (5*I)/68)*Log[I + Tan[c + d*x]])/d + (3*Log[5 + 3*Tan[
c + d*x]])/(34*d)

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.24 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.13

method result size
risch \(\frac {5 x}{34}-\frac {3 i x}{34}-\frac {3 i c}{17 d}+\frac {3 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {8}{17}+\frac {15 i}{17}\right )}{34 d}\) \(35\)
parallelrisch \(\frac {10 d x +6 \ln \left (\frac {5}{3}+\tan \left (d x +c \right )\right )-3 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{68 d}\) \(35\)
norman \(\frac {5 x}{34}+\frac {3 \ln \left (5+3 \tan \left (d x +c \right )\right )}{34 d}-\frac {3 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{68 d}\) \(37\)
derivativedivides \(\frac {\frac {3 \ln \left (5+3 \tan \left (d x +c \right )\right )}{34}-\frac {3 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{68}+\frac {5 \arctan \left (\tan \left (d x +c \right )\right )}{34}}{d}\) \(41\)
default \(\frac {\frac {3 \ln \left (5+3 \tan \left (d x +c \right )\right )}{34}-\frac {3 \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{68}+\frac {5 \arctan \left (\tan \left (d x +c \right )\right )}{34}}{d}\) \(41\)

[In]

int(1/(5+3*tan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

5/34*x-3/34*I*x-3/17*I/d*c+3/34/d*ln(exp(2*I*(d*x+c))+8/17+15/17*I)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {10 \, d x + 3 \, \log \left (\frac {9 \, \tan \left (d x + c\right )^{2} + 30 \, \tan \left (d x + c\right ) + 25}{\tan \left (d x + c\right )^{2} + 1}\right )}{68 \, d} \]

[In]

integrate(1/(5+3*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/68*(10*d*x + 3*log((9*tan(d*x + c)^2 + 30*tan(d*x + c) + 25)/(tan(d*x + c)^2 + 1)))/d

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\begin {cases} \frac {5 x}{34} + \frac {3 \log {\left (3 \tan {\left (c + d x \right )} + 5 \right )}}{34 d} - \frac {3 \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{68 d} & \text {for}\: d \neq 0 \\\frac {x}{3 \tan {\left (c \right )} + 5} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(5+3*tan(d*x+c)),x)

[Out]

Piecewise((5*x/34 + 3*log(3*tan(c + d*x) + 5)/(34*d) - 3*log(tan(c + d*x)**2 + 1)/(68*d), Ne(d, 0)), (x/(3*tan
(c) + 5), True))

Maxima [A] (verification not implemented)

none

Time = 0.41 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.26 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {10 \, d x + 10 \, c - 3 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 6 \, \log \left (3 \, \tan \left (d x + c\right ) + 5\right )}{68 \, d} \]

[In]

integrate(1/(5+3*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/68*(10*d*x + 10*c - 3*log(tan(d*x + c)^2 + 1) + 6*log(3*tan(d*x + c) + 5))/d

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.29 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {10 \, d x + 10 \, c - 3 \, \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 6 \, \log \left ({\left | 3 \, \tan \left (d x + c\right ) + 5 \right |}\right )}{68 \, d} \]

[In]

integrate(1/(5+3*tan(d*x+c)),x, algorithm="giac")

[Out]

1/68*(10*d*x + 10*c - 3*log(tan(d*x + c)^2 + 1) + 6*log(abs(3*tan(d*x + c) + 5)))/d

Mupad [B] (verification not implemented)

Time = 4.54 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.58 \[ \int \frac {1}{5+3 \tan (c+d x)} \, dx=\frac {3\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+\frac {5}{3}\right )}{34\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (-\frac {3}{68}-\frac {5}{68}{}\mathrm {i}\right )}{d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (-\frac {3}{68}+\frac {5}{68}{}\mathrm {i}\right )}{d} \]

[In]

int(1/(3*tan(c + d*x) + 5),x)

[Out]

(3*log(tan(c + d*x) + 5/3))/(34*d) - (log(tan(c + d*x) + 1i)*(3/68 - 5i/68))/d - (log(tan(c + d*x) - 1i)*(3/68
 + 5i/68))/d